import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'

//引入全局uView
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)

let mix = require('@/utils/mix.js');
Vue.mixin(mix)

//导入全局filters
import filters from '@/utils/filter.js'
Object.keys(filters).map(v=>{
	Vue.filter(v,filters[v])
})
import * as Api from './config/api.js'
import * as Common from './config/common.js'
import * as Db from './config/db.js'

import * as Config from './config/config.js'

Vue.prototype.$api = Api;
Vue.prototype.$common = Common;
Vue.prototype.$db = Db;
Vue.prototype.$config = Config;
// 引入uView对小程序分享的mixin封装
let mpShare = require('./config/share.js');
Vue.mixin(mpShare);
//导入混合数据，方法
let mixin = require('config/mixin.js');
Vue.mixin(mixin);
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif